Unequal Trajectories: A Two-Decade Visualization of Global Health, Resources, and Survival

UNICEF_3.png

INTRODUCTION

In an era marked by globalization, pandemics, climate shifts, and persistent inequality, data visualization becomes an indispensable tool for deciphering the complex interplay of socio-economic and health dynamics across nations. This analysis draws from four distinct datasets spanning 2000 to 2020 to map trends in life expectancy, maternal mortality, resource metrics, and international disparities in key development indicators. By weaving together these visual narratives, we uncover patterns of progress juxtaposed with zones of persistent vulnerability. Together, these graphs offer not merely snapshots of our world but an urgent call for data-driven policies that prioritize equity, resilience, and inclusive development.

Code
import pandas as pd
import plotnine as pn
import geopandas as gpd
import matplotlib.pyplot as plt
from IPython.display import HTML

About Libraries

Pandas: Handles normal (tabular) data. GeoPandas: Handles spatial (geographical) data like country borders. Plotnine: Plots the final map as a beautiful, high-resolution static image. Matplotlib: Supports Plotnine in rendering and saving plots. IPython Display: Helps show rich outputs (mostly useful for Plotly, but part of notebook utilities).

Code
indicator1 = pd.read_csv("unicef_indicator_1.csv")
indicator2 = pd.read_csv("unicef_indicator_2.csv")
metadata = pd.read_csv("unicef_metadata.csv")
Code
indicator1.head()
country alpha_2_code alpha_3_code numeric_code indicator time_period obs_value sex unit_multiplier unit_of_measure observation_status observation_confidentaility time_period_activity_related_to_when_the_data_are_collected current_age
0 Afghanistan AF AFG 4 Maternal deaths (estimated) 2000 13407.6 Total Units % Modelled Free NaN Total
1 Afghanistan AF AFG 4 Maternal deaths (estimated) 2001 12339.5 Total Units % Modelled Free NaN Total
2 Afghanistan AF AFG 4 Maternal deaths (estimated) 2002 12517.6 Total Units % Modelled Free NaN Total
3 Afghanistan AF AFG 4 Maternal deaths (estimated) 2003 12714.4 Total Units % Modelled Free NaN Total
4 Afghanistan AF AFG 4 Maternal deaths (estimated) 2004 12230.3 Total Units % Modelled Free NaN Total
Code
indicator1.shape
(3885, 14)
Code
indicator2.head()
country alpha_2_code alpha_3_code numeric_code indicator time_period obs_value sex unit_multiplier unit_of_measure observation_status observation_confidentaility time_period_activity_related_to_when_the_data_are_collected current_age
0 Afghanistan AF AFG 4 Adjusted net attendance rate for children of p... 2015 53.200001 Female NaN % NaN NaN NaN Total
1 Afghanistan AF AFG 4 Adjusted net attendance rate for children of p... 2015 73.099998 Male NaN % NaN NaN NaN Total
2 Afghanistan AF AFG 4 Adjusted net attendance rate for children of p... 2015 63.700001 Total NaN % NaN NaN NaN Total
3 Albania AL ALB 8 Adjusted net attendance rate for children of p... 2018 91.392990 Female NaN % NaN NaN NaN Total
4 Albania AL ALB 8 Adjusted net attendance rate for children of p... 2018 88.879219 Male NaN % NaN NaN NaN Total
Code
metadata.head()
country alpha_2_code alpha_3_code numeric_code year Population, total GDP per capita (constant 2015 US$) GNI (current US$) Inflation, consumer prices (annual %) Life expectancy at birth, total (years) Military expenditure (% of GDP) Fossil fuel energy consumption (% of total) GDP growth (annual %) Birth rate, crude (per 1,000 people) Hospital beds (per 1,000 people)
0 Afghanistan AF AFG 4 1960 9035043.0 NaN 5.488888e+08 NaN 32.535 NaN NaN NaN 50.340 0.170627
1 Afghanistan AF AFG 4 1961 9214083.0 NaN 5.600000e+08 NaN 33.068 NaN NaN NaN 50.443 NaN
2 Afghanistan AF AFG 4 1962 9404406.0 NaN 5.577778e+08 NaN 33.547 NaN NaN NaN 50.570 NaN
3 Afghanistan AF AFG 4 1963 9604487.0 NaN 7.666667e+08 NaN 34.016 NaN NaN NaN 50.703 NaN
4 Afghanistan AF AFG 4 1964 9814318.0 NaN 8.155556e+08 NaN 34.494 NaN NaN NaN 50.831 NaN
Code
combined = pd.merge(indicator1, indicator2, on=["country", "time_period"], how="outer")
combined = pd.merge(combined, metadata, on="country", how="left")
Code
combined.head()
country alpha_2_code_x alpha_3_code_x numeric_code_x indicator_x time_period obs_value_x sex_x unit_multiplier_x unit_of_measure_x ... Population, total GDP per capita (constant 2015 US$) GNI (current US$) Inflation, consumer prices (annual %) Life expectancy at birth, total (years) Military expenditure (% of GDP) Fossil fuel energy consumption (% of total) GDP growth (annual %) Birth rate, crude (per 1,000 people) Hospital beds (per 1,000 people)
0 Afghanistan AF AFG 4.0 Maternal deaths (estimated) 2000 13407.6 Total Units % ... 9035043.0 NaN 5.488888e+08 NaN 32.535 NaN NaN NaN 50.340 0.170627
1 Afghanistan AF AFG 4.0 Maternal deaths (estimated) 2000 13407.6 Total Units % ... 9214083.0 NaN 5.600000e+08 NaN 33.068 NaN NaN NaN 50.443 NaN
2 Afghanistan AF AFG 4.0 Maternal deaths (estimated) 2000 13407.6 Total Units % ... 9404406.0 NaN 5.577778e+08 NaN 33.547 NaN NaN NaN 50.570 NaN
3 Afghanistan AF AFG 4.0 Maternal deaths (estimated) 2000 13407.6 Total Units % ... 9604487.0 NaN 7.666667e+08 NaN 34.016 NaN NaN NaN 50.703 NaN
4 Afghanistan AF AFG 4.0 Maternal deaths (estimated) 2000 13407.6 Total Units % ... 9814318.0 NaN 8.155556e+08 NaN 34.494 NaN NaN NaN 50.831 NaN

5 rows × 40 columns

Material Observation Value by Time Period

Code
# Time series plot
mortality_ts = combined.groupby('time_period')['obs_value_x'].sum().reset_index()

(pn.ggplot(mortality_ts, pn.aes(x='time_period', y='obs_value_x')) +
 pn.geom_area(fill='sienna', alpha=0.7) +
 pn.geom_text(pn.aes(label='obs_value_x'), va='bottom', size=8, nudge_y=100) +
 pn.theme_minimal() +
 pn.labs(title="Maternal observation value by time period", x="time_period", y="obs_value_x")+
  pn.theme(figure_size=(16, 6)))

The second graph focuses on material or economic resource metrics over the same twenty-year period, displaying significant volatility. Multiple values listed per year imply subcategories within material observation (perhaps by sector or geographic division). A particularly striking feature is the enormous spike observed in 2015 (~600 million), followed by a steep decline by 2020 (to about 22.5 million). This suggests either an extraordinary one-time event, such as a major resource discovery or economic boom, or potential data irregularities, such as an error in data recording. Post-2015 decline could plausibly be linked to global disruptions such as the COVID-19 pandemic, economic recessions, or environmental disasters, all of which negatively impacted production and resource extraction. Overall, this graph exposes the fragility and unpredictability of material wealth, highlighting the importance of economic diversification and crisis preparedness, especially for nations heavily dependent on specific resources.

Life Expectancy at Birth, Total (Years)

Code
# Gallery, points
(
    pn.ggplot(combined, pn.aes("time_period", "Life expectancy at birth, total (years)", size="obs_value_y")) # Replace var1 with an actual column from your dataframe - obs_value_y
    + pn.geom_point(pn.aes(fill="obs_value_x"), stroke=0, alpha=0.5) # Replace var2 with an actual column - country
    +pn.theme(figure_size=(16, 6)))# Replace var2 with an actual column - country
/usr/local/lib/python3.11/dist-packages/plotnine/layer.py:364: PlotnineWarning:

geom_point : Removed 240221 rows containing missing values.

The first graph tracks life expectancy at birth over five-year intervals between 2000 and 2020. Although exact numerical values are not detailed, the general trend points towards a steady improvement globally, likely reflecting advancements in healthcare, nutrition, disease prevention, and public health interventions. The graph suggests that life expectancy has risen overall, especially in countries investing heavily in healthcare infrastructure and universal services. However, it is important to note that while global averages improve, they can mask regional disparities; fragile states or conflict-affected regions may lag far behind global trends. The use of Python libraries (pandas and nlativ_express) for analysis indicates a methodical, programmatic approach that enhances accuracy and scalability for future trend forecasting. This graph, thus, paints a cautiously optimistic picture—progress is real, but uneven.

Global Visualization of Observation Values by Country

Code
import pandas as pd
import plotly.express as px

# 1. Load the CSV file
df = pd.read_csv("/content/unicef_indicator_1.csv")

# 2. List of countries (your provided array)
countries = [
    'Afghanistan', 'Albania', 'Algeria', 'Angola', 'Antigua and Barbuda',
    'Argentina', 'Armenia', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas',
    'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize',
    'Benin', 'Bhutan', 'Bolivia, Plurinational State of', 'Bosnia and Herzegovina',
    'Botswana', 'Brazil', 'Brunei', 'Bulgaria', 'Burkina Faso', 'Burundi',
    'Cambodia', 'Cameroon', 'Canada', 'Cape Verde', 'Central African Republic',
    'Chad', 'Chile', 'China', 'Colombia', 'Comoros', 'Congo',
    'Congo, the Democratic Republic of the', 'Costa Rica', 'Croatia', 'Cuba',
    'Cyprus', 'Czech Republic', 'Denmark', 'Djibouti', 'Dominican Republic',
    'Ecuador', 'Egypt', 'El Salvador', 'Equatorial Guinea', 'Eritrea',
    'Estonia', 'Ethiopia', 'Fiji', 'Finland', 'France', 'Gabon', 'Gambia',
    'Georgia', 'Germany', 'Ghana', 'Greece', 'Grenada', 'Guatemala', 'Guinea',
    'Guinea-Bissau', 'Guyana', 'Haiti', 'Honduras', 'Hungary', 'Iceland',
    'India', 'Indonesia', 'Iran, Islamic Republic of', 'Iraq', 'Ireland',
    'Israel', 'Italy', 'Ivory Coast', 'Jamaica', 'Japan', 'Jordan', 'Kazakhstan',
    'Kenya', 'Kiribati', "Korea, Democratic People's Republic of", 'Kuwait',
    'Kyrgyzstan', "Lao People's Democratic Republic", 'Latvia', 'Lebanon',
    'Lesotho', 'Liberia', 'Libyan Arab Jamahiriya', 'Lithuania', 'Luxembourg',
    'Macedonia, the former Yugoslav Republic of', 'Madagascar', 'Malawi',
    'Malaysia', 'Maldives', 'Mali', 'Malta', 'Mauritania', 'Mauritius',
    'Mexico', 'Micronesia, Federated States of', 'Moldova, Republic of',
    'Mongolia', 'Montenegro', 'Morocco', 'Mozambique', 'Myanmar', 'Namibia',
    'Nauru', 'Nepal', 'Netherlands', 'New Zealand', 'Nicaragua', 'Niger',
    'Nigeria', 'Niue', 'Norway', 'Oman', 'Pakistan', 'Palestinian Territory, Occupied',
    'Panama', 'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Poland',
    'Portugal', 'Puerto Rico', 'Qatar', 'Romania', 'Russian Federation', 'Rwanda',
    'Saint Lucia', 'Samoa', 'Sao Tome and Principe', 'Saudi Arabia', 'Senegal',
    'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia', 'Slovenia',
    'Solomon Islands', 'Somalia', 'South Africa', 'South Korea', 'South Sudan',
    'Spain', 'Sri Lanka', 'St. Vincent and the Grenadines', 'Sudan', 'Suriname',
    'Swaziland', 'Sweden', 'Switzerland', 'Syrian Arab Republic', 'Tajikistan',
    'Tanzania, United Republic of', 'Thailand', 'Timor-Leste', 'Togo', 'Tonga',
    'Trinidad and Tobago', 'Tunisia', 'Turkey', 'Turkmenistan', 'Turks and Caicos Islands',
    'Tuvalu', 'Uganda', 'Ukraine', 'United Arab Emirates', 'United Kingdom',
    'United States', 'Uruguay', 'Uzbekistan', 'Vanuatu', 'Venezuela, Bolivarian Republic of',
    'Vietnam', 'Yemen', 'Zambia', 'Zimbabwe'
]

# 3. Filter the dataframe
filtered_df = df[df['country'].isin(countries)]

# 4. Plot using Plotly Express
fig = px.choropleth(
    filtered_df,
    locations="country",
    locationmode="country names",
    color="obs_value",
    color_continuous_scale="Viridis",
    title="Global Visualization of Observation Values by Country"
)

fig.update_layout(geo=dict(showframe=False, showcoastlines=False))
fig.show()

The final graph presents a tabular visualization comparing countries by their “observation values,” with a steep decline from the highest to the lowest entries. Although the exact metric being observed remains ambiguous, the structure suggests a sharp global disparity in access to critical resources, services, or opportunities. Countries clustered at the top of the table (near 100,000) likely enjoy robust healthcare, education, and economic systems, while those towards the bottom approach near-zero access. The presence of the term “NOLUSION” (possibly a typo or project code) clouds full interpretation, but the overarching message remains clear: the gap between the most and least resourced nations is staggering. This inequity threatens global stability, with under-resourced nations disproportionately vulnerable to crises and developmental stagnation.

CONCLUSION

Taken together, these visualizations construct a sobering narrative about global health, economic resilience, and survival between 2000 and 2020. While life expectancy has broadly improved, material resource instability and persistently high maternal mortality in certain regions reveal an uneven global reality. The data emphasizes that material wealth alone does not guarantee health equity; rather, targeted investments in healthcare access, maternal health services, and sustainable resource management are essential. Furthermore, the steep disparities in observation values across countries demand urgent international cooperation to narrow the equity gap. As the world grapples with overlapping crises—climate change, pandemics, geopolitical conflict—only through data-driven, inclusive policymaking can sustainable development truly be realized. These graphs, far from being mere academic exercises, are blueprints for a more equitable, resilient, and healthier global future.